#!/sbin/openrc-run

# Extract user name from file name.
user="${SVCNAME#gnunet-}"  # Cut off prefix.
user="${user%-services}"   # Cut off suffix.

description="GNUnet user services for $user"
command="/usr/lib/gnunet/libexec/gnunet-service-arm"
command_args="-c /home/$user/.config/gnunet.conf"
command_user="$user:$user"
command_background="yes"
pidfile="/run/${SVCNAME}.$user.pid"

depend() {
        need gnunet-system-services
}
